#include <iostream>

class Base
{
public:
    int a;
protected:
    int b;
private:
    int c;  //父类的私有成员在子类中都不可见
};
//保护继承后的父类在类外都不可见
//私有继承后的父类成员在子类中都是私有，再次派生类不可访问
class Derived:private Base
{
    void Func()
    {
        std::cout<<a<<std::endl;
    }
};

class Derived2:public Derived
{
    void FUnc()
    {
        std::cout<<a<<std::endl;
    }
};